// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.meego 1.0
import "getUrls.js" as Geturl
import "getcoments.js" as GetComents
import "storage.js" as St
Component {

         Column {
            id: column1
            height: children.height
            transformOrigin: Item.Center
            width: parent.width

            Row
          {

            spacing: 10
            width:parent.width
            height: children.height
            Rectangle {
                 width: 1
                 height: 10
                 opacity: 0.001
             }

            Image {
                source: Geturl.getavitorbyuser(user);
            }

           Label {
           width:400;

           text:undefined===user?"匿名发表":user.login;
           platformStyle: LabelStyle{
           textColor:appWindow.labelcolor
           }
           height: children.height
           }
          }
        Row{
            height:children.height
            width: parent.width
            Rectangle {
                 width: 10
                height: parent.height
                 opacity: 0.001
             }

            Text {

                     width:parent.width-20
                     wrapMode: Text.WordWrap
                     font.pointSize: appWindow.fontsize
                     color:appWindow.contntcolor
                     clip:true
                    // textFormat: Text.RichText
                     text: content.replace(/\r/g,"")
                     MouseArea{
                        anchors.fill: parent;

                         onClicked: {
                             console.log("this content is clicked=============");
                             //appWindow.pageStack.push(about);
                             appWindow.pageStack.push(Qt.resolvedUrl("ArticleMine.qml"),
                                                      { contentObj: listModel.get(index) })
                         }
                     }
                 }
            Rectangle
            {
                 width: 10
                height: parent.height
                 opacity: 0.001
             }


        }

        Row{
            height:children.height
            width: parent.width
            Rectangle {
                 width: 10
                height: parent.height
                 opacity: 0.001
             }

            Image {
                   id:imagesss
                   source: Geturl.getsmall(this,id,image)
                   MouseArea{
                       anchors.fill: parent

                       onClicked: {
                           //imagesmall.source = parent.source
                           Geturl.showimage(id,image);
                           console.log("message the image is cickit :which one:"+id+"image "+image
                                       +"   parnet :"+parent.source)
                       }
                   }
               }
            Rectangle {
                 width: parent.width-imagesss.width-10
                height: parent.height
                 opacity: 0.001
                 MouseArea{
                    anchors.fill: parent;

                     onClicked: {
                         console.log("this content is clicked=============");
                         //appWindow.pageStack.push(about);
                         appWindow.pageStack.push(Qt.resolvedUrl("ArticleMine.qml"),
                                                  { contentObj: listModel.get(index) })
                     }
                 }
             }
        }



     Row{
        width: parent.width
        height: children.height
        visible:!(undefined===tag)
        //height: 20
        spacing: 10

        Rectangle {
             width: 1
             height: 10
             opacity: 0.001
         }
        Image {
            height: children.height
            source: "images/icon_tag.png"
        }

        Text{
            width:parent.width
            wrapMode: Text.WordWrap

            color:appWindow.labelcolor
            font.pointSize: 15
            text:undefined===tag?"":tag
        }

     }
     Row{
        width: parent.width
        //height: 20
        height: children.height
        Rectangle {
             width: 10
             height: 10
             opacity: 0.001
         }
        Image {
            height: children.height
            source: "images/icon_for_enable.png"
        }
        Label{
            width:children.width
            wrapMode: Text.WordWrap
            font.pointSize: 15
            platformStyle: LabelStyle{
            textColor:appWindow.labelcolor
            }
            text:votes.up
        }
        Rectangle {
             width: 50
             height: 10
             opacity: 0.001
         }
        Image {
            height: children.height
            source: "images/icon_against_enable.png"
        }
        Label{
            width:children.width
            wrapMode: Text.WordWrap
            font.pointSize: 15
            platformStyle: LabelStyle{
            textColor:appWindow.labelcolor
            }
            text:votes.down
        }
        Rectangle {
             width: 80
             height: 10
             opacity: 0.001
         }
        Image {
            height: children.height
            source: "images/icon_comment_enable.png"
        }
        Label{
            width:children.width
            wrapMode: Text.WordWrap
            font.pointSize: 15
            platformStyle: LabelStyle{
            textColor:appWindow.labelcolor
            }
            text:comments_count
        }
     }



           Image {
               height: 5
               width:parent.width
               fillMode: Image.TileHorizontally
               source: "images/block_line.png"
           }

           Rectangle{
               height: 5
               width:parent.width
               opacity: 0.001
           }
         }

}

